package bat.ke.qq.com.service.impl;

import bat.ke.qq.com.bean.Goods;
import bat.ke.qq.com.core.APIMapping;
import bat.ke.qq.com.service.GoodsService;
import org.springframework.stereotype.Service;

import java.lang.reflect.Method;

/**
 * 源码学院-Fox
 * 只为培养BAT程序员而生
 * http://bat.ke.qq.com
 * 往期视频加群:516212256 暗号:6
 */
@Service
public class GoodsServiceImpl implements GoodsService {

	//无缝集成    http://localhost:8080/api?method=bat.api.goods.add&params={"goods":{"goodsName":"娃娃","goodsId":11},id:100}
	@APIMapping(value = "bat.api.goods.add")
	@Override
	public Goods addGoods(Goods goods, Integer id){

		return goods;
	}

	@APIMapping("bat.api.goods.get")
	@Override
	public Goods getGoods(Integer id){
	return new Goods("vvv","1111");
}

}
